package kr.hkit.powerjava.chapter17;

/* 사용자 정의 정렬
 * select title from list_title
order by 
case title
	when "사원" then 1
	when "대리" then 2
	when "과장" then 3
	when "부장" then 4
	else 5
end asc;*/

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.border.EmptyBorder;

public class ListTest extends JFrame{

	private static final long serialVersionUID = 1L;

	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					ListTest frame = new ListTest();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	public ListTest() {
		initialize();
	}
	private void initialize() {
		setTitle("리스트");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		
		JPanel contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		contentPane.add(tabbedPane, BorderLayout.CENTER);
		
		JPanel panelJList = new ListPanel();
		tabbedPane.addTab("JList", null, panelJList, null);
		
		CmbPanel panelJCombo = new CmbPanel();
		tabbedPane.addTab("JComboBox", null, panelJCombo, null);
		
		TablePanel panelJTable = new TablePanel();
		tabbedPane.addTab("Table", null, panelJTable, null);
				
	}

}
